#ifndef CMEAL_H
#define CMEAL_H

#include <QObject>
#include "cobject.h"
namespace cooking {

class CMeal : public CObject
{
    Q_OBJECT
    Q_ENUMS(MealStatus)
//    Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
    Q_PROPERTY(int scheduleTime READ scheduleTime WRITE setScheduleTime NOTIFY scheduleTimeChanged)
    Q_PROPERTY(MealStatus status READ status WRITE setStatus NOTIFY statusChanged)
public:
    explicit CMeal(QObject *parent = 0);
    enum MealStatus {
        Default,
        Scheduled,
        Cooking,
        Served,
        Canceled
    };

//    int id();
//    void setId(int id);

    QString name();
    void setName(QString name);

    QString description();
    void setDescription(QString description);

    int scheduleTime();
    void setScheduleTime(int scheduleTime);

    MealStatus status();
    void setStatus(MealStatus status);

signals:
//    void idChanged();
    void nameChanged();
    void descriptionChanged();
    void scheduleTimeChanged();
    void statusChanged();

public slots:
private:
//    int m_id;
    QString m_name;
    QString m_description;
    int m_schedule_time;
    MealStatus m_status;
};
} // namespace cooking
#endif // CMEAL_H
